package com.litelimit.autoconfigure;

import com.litelimit.autoconfigure.configure.AspectConfiguration;
import com.litelimit.autoconfigure.configure.LuaConfiguration;
import com.litelimit.autoconfigure.configure.StrategyConfiguration;
import com.litelimit.core.limit.LiteLimitProps;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Import;

/**
 * 自动配置类
 */
@AutoConfiguration
@EnableConfigurationProperties(LiteLimitProps.class)
@ConditionalOnProperty(prefix = "lite-limit", name = "enable", havingValue = "true"
        , matchIfMissing = true)
@Import({LuaConfiguration.class, StrategyConfiguration.class, AspectConfiguration.class})
public class LiteLimitAutoConfiguration {

}
